package interview.base;

public class StringCompare {

    public static void main(String[] args) {
        String a = new String ("ab");
        String b = new String("ab");
        String c = "ab";
        String d = "ab";
        String e = "a"+new String("b");
        System.out.println(a==b);
        System.out.println(a==c);
        System.out.println(a==e);

        System.out.println(b==d);
        System.out.println(b==e);

        System.out.println(c==d);
        System.out.println(a.equals(b));
    }
}
